package com.norbitltd.guavaleaves.java.lang;

import java.util.Date;

import com.google.common.base.Function;

public class LongFunctions {

	public static Function<Integer, Integer> abs() {
		return new Function<Integer, Integer>() {
			public Integer apply(Integer input) {
				return Math.abs(input);
			}
		};
	}

	public static Function<Long, Date> toDate() {
		return new Function<Long, Date>() {
			public Date apply(Long input) {
				return input == null ? null : new Date(input);
			}
		};
	}
}
